package com.yochi.pictureseditor.images.converters;

public class CartCoord {

	private int x;
	private int y;
	
	public CartCoord(double r, double theta, int centerX, int centerY) {
		this.x = Double.valueOf(r * Math.cos(theta) + centerX).intValue();
		this.y = Double.valueOf(r * Math.sin(theta) + centerY).intValue();
	}

	public int getX() {
		return x;
	}

	public void setX(int x) {
		this.x = x;
	}

	public int getY() {
		return y;
	}

	public void setY(int y) {
		this.y = y;
	}

	@Override
	public String toString() {
		return "CartCoord [x=" + x + ", y=" + y + "]";
	}
	
}
